home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / plaf / basic / BasicSplitPaneUI.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  14.0 KB  |  572 lines

  1. package javax.swing.plaf.basic;
  2.  
  3. import java.awt.Color;
  4. import java.awt.Component;
  5. import java.awt.Dimension;
  6. import java.awt.Graphics;
  7. import java.awt.Insets;
  8. import java.awt.LayoutManager;
  9. import java.awt.Rectangle;
  10. import java.awt.event.ActionListener;
  11. import java.awt.event.FocusListener;
  12. import java.awt.peer.ComponentPeer;
  13. import java.awt.peer.LightweightPeer;
  14. import java.beans.PropertyChangeListener;
  15. import javax.swing.JComponent;
  16. import javax.swing.JSplitPane;
  17. import javax.swing.KeyStroke;
  18. import javax.swing.LookAndFeel;
  19. import javax.swing.RepaintManager;
  20. import javax.swing.UIManager;
  21. import javax.swing.plaf.ComponentUI;
  22. import javax.swing.plaf.SplitPaneUI;
  23.  
  24. public class BasicSplitPaneUI extends SplitPaneUI {
  25.    protected static final String NON_CONTINUOUS_DIVIDER = "nonContinuousDivider";
  26.    protected static int KEYBOARD_DIVIDER_MOVE_OFFSET = 3;
  27.    protected JSplitPane splitPane;
  28.    protected BasicHorizontalLayoutManager layoutManager;
  29.    protected BasicSplitPaneDivider divider;
  30.    protected PropertyChangeListener propertyChangeListener;
  31.    protected FocusListener focusListener;
  32.    protected int dividerSize;
  33.    protected Component nonContinuousLayoutDivider;
  34.    protected boolean draggingHW;
  35.    protected int beginDragDividerLocation;
  36.    protected KeyStroke upKey;
  37.    protected KeyStroke downKey;
  38.    protected KeyStroke leftKey;
  39.    protected KeyStroke rightKey;
  40.    protected KeyStroke homeKey;
  41.    protected KeyStroke endKey;
  42.    protected KeyStroke dividerResizeToggleKey;
  43.    private KeyStroke kpUpKey;
  44.    private KeyStroke kpDownKey;
  45.    private KeyStroke kpLeftKey;
  46.    private KeyStroke kpRightKey;
  47.    protected ActionListener keyboardUpLeftListener;
  48.    protected ActionListener keyboardDownRightListener;
  49.    protected ActionListener keyboardHomeListener;
  50.    protected ActionListener keyboardEndListener;
  51.    protected ActionListener keyboardResizeToggleListener;
  52.    private int orientation;
  53.    private int lastDragLocation;
  54.    private boolean continuousLayout;
  55.    private boolean dividerKeyboardResize;
  56.    private boolean dividerLocationIsSet;
  57.  
  58.    // $FF: synthetic method
  59.    static int access$0(BasicSplitPaneUI var0) {
  60.       return var0.orientation;
  61.    }
  62.  
  63.    // $FF: synthetic method
  64.    static void access$1(BasicSplitPaneUI var0, int var1) {
  65.       var0.orientation = var1;
  66.    }
  67.  
  68.    // $FF: synthetic method
  69.    static boolean access$2(BasicSplitPaneUI var0) {
  70.       return var0.dividerKeyboardResize;
  71.    }
  72.  
  73.    // $FF: synthetic method
  74.    static void access$3(BasicSplitPaneUI var0, boolean var1) {
  75.       var0.dividerKeyboardResize = var1;
  76.    }
  77.  
  78.    // $FF: synthetic method
  79.    static boolean access$4(BasicSplitPaneUI var0) {
  80.       return var0.dividerLocationIsSet;
  81.    }
  82.  
  83.    public BasicSplitPaneDivider createDefaultDivider() {
  84.       return new BasicSplitPaneDivider(this);
  85.    }
  86.  
  87.    protected Component createDefaultNonContinuousLayoutDivider() {
  88.       return new 1(this);
  89.    }
  90.  
  91.    protected FocusListener createFocusListener() {
  92.       return new FocusHandler(this);
  93.    }
  94.  
  95.    protected ActionListener createKeyboardDownRightListener() {
  96.       return new KeyboardDownRightHandler(this);
  97.    }
  98.  
  99.    protected ActionListener createKeyboardEndListener() {
  100.       return new KeyboardEndHandler(this);
  101.    }
  102.  
  103.    protected ActionListener createKeyboardHomeListener() {
  104.       return new KeyboardHomeHandler(this);
  105.    }
  106.  
  107.    protected ActionListener createKeyboardResizeToggleListener() {
  108.       return new KeyboardResizeToggleHandler(this);
  109.    }
  110.  
  111.    protected ActionListener createKeyboardUpLeftListener() {
  112.       return new KeyboardUpLeftHandler(this);
  113.    }
  114.  
  115.    protected PropertyChangeListener createPropertyChangeListener() {
  116.       return new PropertyHandler(this);
  117.    }
  118.  
  119.    public static ComponentUI createUI(JComponent var0) {
  120.       return new BasicSplitPaneUI();
  121.    }
  122.  
  123.    protected void dragDividerTo(int var1) {
  124.       if (this.getLastDragLocation() != var1) {
  125.          if (this.isContinuousLayout()) {
  126.             this.setDividerLocation(this.splitPane, var1);
  127.             this.setLastDragLocation(var1);
  128.          } else {
  129.             int var2 = this.getLastDragLocation();
  130.             this.setLastDragLocation(var1);
  131.             if (this.orientation == 1) {
  132.                int var3 = this.splitPane.getSize().height;
  133.                if (this.draggingHW) {
  134.                   this.nonContinuousLayoutDivider.setLocation(this.getLastDragLocation(), 0);
  135.                } else {
  136.                   this.splitPane.repaint(var2, 0, this.dividerSize, var3);
  137.                   this.splitPane.repaint(var1, 0, this.dividerSize, var3);
  138.                }
  139.             } else {
  140.                int var4 = this.splitPane.getSize().width;
  141.                if (this.draggingHW) {
  142.                   this.nonContinuousLayoutDivider.setLocation(0, this.getLastDragLocation());
  143.                } else {
  144.                   this.splitPane.repaint(0, var2, var4, this.dividerSize);
  145.                   this.splitPane.repaint(0, var1, var4, this.dividerSize);
  146.                }
  147.             }
  148.          }
  149.       }
  150.  
  151.    }
  152.  
  153.    protected void finishDraggingTo(int var1) {
  154.       this.dragDividerTo(var1);
  155.       this.setLastDragLocation(-1);
  156.       if (!this.isContinuousLayout()) {
  157.          Component var2 = this.splitPane.getLeftComponent();
  158.          Rectangle var3 = var2.getBounds();
  159.          if (this.orientation == 1) {
  160.             int var4 = this.splitPane.getSize().height;
  161.             var2.setSize(var1 - var3.x - this.getDividerBorderSize(), var3.height);
  162.             if (this.draggingHW) {
  163.                this.nonContinuousLayoutDivider.setLocation(-this.dividerSize, 0);
  164.             }
  165.  
  166.             this.splitPane.paintImmediately(var1, 0, this.dividerSize, var4);
  167.          } else {
  168.             int var5 = this.splitPane.getSize().width;
  169.             var2.setSize(var3.width, var1 - var3.y - this.getDividerBorderSize());
  170.             if (this.draggingHW) {
  171.                this.nonContinuousLayoutDivider.setLocation(0, -this.dividerSize);
  172.             }
  173.  
  174.             this.splitPane.paintImmediately(0, var1, var5, this.dividerSize);
  175.          }
  176.  
  177.          this.splitPane.revalidate();
  178.          RepaintManager.currentManager(this.splitPane).validateInvalidComponents();
  179.          this.splitPane.repaint();
  180.       }
  181.  
  182.       this.splitPane.setLastDividerLocation(this.beginDragDividerLocation);
  183.    }
  184.  
  185.    public void finishedPaintingChildren(JSplitPane var1, Graphics var2) {
  186.       if (var1 == this.splitPane && this.getLastDragLocation() != -1 && !this.isContinuousLayout() && !this.draggingHW) {
  187.          Dimension var3 = this.splitPane.getSize();
  188.          var2.setColor(Color.darkGray);
  189.          if (this.orientation == 1) {
  190.             var2.fillRect(this.getLastDragLocation(), 0, this.dividerSize - 1, var3.height - 1);
  191.          } else {
  192.             var2.fillRect(0, this.lastDragLocation, var3.width - 1, this.dividerSize - 1);
  193.          }
  194.       }
  195.  
  196.    }
  197.  
  198.    public BasicSplitPaneDivider getDivider() {
  199.       return this.divider;
  200.    }
  201.  
  202.    protected int getDividerBorderSize() {
  203.       return 1;
  204.    }
  205.  
  206.    public int getDividerLocation(JSplitPane var1) {
  207.       return this.orientation == 1 ? this.divider.getLocation().x : this.divider.getLocation().y;
  208.    }
  209.  
  210.    public Insets getInsets(JComponent var1) {
  211.       return null;
  212.    }
  213.  
  214.    public int getLastDragLocation() {
  215.       return this.lastDragLocation;
  216.    }
  217.  
  218.    public int getMaximumDividerLocation(JSplitPane var1) {
  219.       Dimension var2 = this.splitPane.getSize();
  220.       int var3 = 0;
  221.       Component var4 = this.splitPane.getRightComponent();
  222.       if (var4 != null) {
  223.          Insets var5 = this.splitPane.getInsets();
  224.          Dimension var6 = new Dimension(0, 0);
  225.          if (var4.isVisible()) {
  226.             var6 = var4.getMinimumSize();
  227.          }
  228.  
  229.          if (this.orientation == 1) {
  230.             var3 = var2.width - var6.width;
  231.          } else {
  232.             var3 = var2.height - var6.height;
  233.          }
  234.  
  235.          var3 -= this.dividerSize + this.getDividerBorderSize();
  236.          if (var5 != null) {
  237.             if (this.orientation == 1) {
  238.                var3 += var5.left;
  239.             } else {
  240.                var3 += var5.top;
  241.             }
  242.          }
  243.       }
  244.  
  245.       return Math.max(this.getMinimumDividerLocation(this.splitPane), var3);
  246.    }
  247.  
  248.    public Dimension getMaximumSize(JComponent var1) {
  249.       return this.splitPane != null ? this.layoutManager.maximumLayoutSize(this.splitPane) : new Dimension(0, 0);
  250.    }
  251.  
  252.    public int getMinimumDividerLocation(JSplitPane var1) {
  253.       int var2 = 0;
  254.       Component var3 = this.splitPane.getLeftComponent();
  255.       if (var3 != null && var3.isVisible()) {
  256.          Insets var4 = this.splitPane.getInsets();
  257.          Dimension var5 = var3.getMinimumSize();
  258.          if (this.orientation == 1) {
  259.             var2 = var5.width;
  260.          } else {
  261.             var2 = var5.height;
  262.          }
  263.  
  264.          var2 += this.getDividerBorderSize();
  265.          if (var4 != null) {
  266.             if (this.orientation == 1) {
  267.                var2 += var4.left;
  268.             } else {
  269.                var2 += var4.top;
  270.             }
  271.          }
  272.       }
  273.  
  274.       return var2;
  275.    }
  276.  
  277.    public Dimension getMinimumSize(JComponent var1) {
  278.       return this.splitPane != null ? this.layoutManager.minimumLayoutSize(this.splitPane) : new Dimension(0, 0);
  279.    }
  280.  
  281.    public Component getNonContinuousLayoutDivider() {
  282.       return this.nonContinuousLayoutDivider;
  283.    }
  284.  
  285.    public int getOrientation() {
  286.       return this.orientation;
  287.    }
  288.  
  289.    public Dimension getPreferredSize(JComponent var1) {
  290.       return this.splitPane != null ? this.layoutManager.preferredLayoutSize(this.splitPane) : new Dimension(0, 0);
  291.    }
  292.  
  293.    public JSplitPane getSplitPane() {
  294.       return this.splitPane;
  295.    }
  296.  
  297.    protected void installDefaults() {
  298.       LookAndFeel.installBorder(this.splitPane, "SplitPane.border");
  299.       if (this.divider == null) {
  300.          this.divider = this.createDefaultDivider();
  301.       }
  302.  
  303.       this.divider.setBasicSplitPaneUI(this);
  304.       this.splitPane.setDividerSize((Integer)UIManager.get("SplitPane.dividerSize"));
  305.       this.divider.setDividerSize(this.splitPane.getDividerSize());
  306.       this.splitPane.add(this.divider, "divider");
  307.       this.setOrientation(this.splitPane.getOrientation());
  308.       this.setContinuousLayout(this.splitPane.isContinuousLayout());
  309.       this.resetLayoutManager();
  310.       if (this.nonContinuousLayoutDivider == null) {
  311.          this.setNonContinuousLayoutDivider(this.createDefaultNonContinuousLayoutDivider(), true);
  312.       } else {
  313.          this.setNonContinuousLayoutDivider(this.nonContinuousLayoutDivider, true);
  314.       }
  315.  
  316.    }
  317.  
  318.    protected void installKeyboardActions() {
  319.       this.upKey = KeyStroke.getKeyStroke(38, 0);
  320.       this.splitPane.registerKeyboardAction(this.keyboardUpLeftListener, this.upKey, 1);
  321.       this.downKey = KeyStroke.getKeyStroke(40, 0);
  322.       this.splitPane.registerKeyboardAction(this.keyboardDownRightListener, this.downKey, 1);
  323.       this.leftKey = KeyStroke.getKeyStroke(37, 0);
  324.       this.splitPane.registerKeyboardAction(this.keyboardUpLeftListener, this.leftKey, 1);
  325.       this.rightKey = KeyStroke.getKeyStroke(39, 0);
  326.       this.splitPane.registerKeyboardAction(this.keyboardDownRightListener, this.rightKey, 1);
  327.       this.kpUpKey = KeyStroke.getKeyStroke("KP_UP");
  328.       this.splitPane.registerKeyboardAction(this.keyboardUpLeftListener, this.kpUpKey, 1);
  329.       this.kpDownKey = KeyStroke.getKeyStroke("KP_DOWN");
  330.       this.splitPane.registerKeyboardAction(this.keyboardDownRightListener, this.kpDownKey, 1);
  331.       this.kpLeftKey = KeyStroke.getKeyStroke("KP_LEFT");
  332.       this.splitPane.registerKeyboardAction(this.keyboardUpLeftListener, this.kpLeftKey, 1);
  333.       this.kpRightKey = KeyStroke.getKeyStroke("KP_RIGHT");
  334.       this.splitPane.registerKeyboardAction(this.keyboardDownRightListener, this.kpRightKey, 1);
  335.       this.homeKey = KeyStroke.getKeyStroke(36, 0);
  336.       this.splitPane.registerKeyboardAction(this.keyboardHomeListener, this.homeKey, 1);
  337.       this.endKey = KeyStroke.getKeyStroke(35, 0);
  338.       this.splitPane.registerKeyboardAction(this.keyboardEndListener, this.endKey, 1);
  339.       this.dividerResizeToggleKey = KeyStroke.getKeyStroke(119, 0);
  340.       this.splitPane.registerKeyboardAction(this.keyboardResizeToggleListener, this.dividerResizeToggleKey, 1);
  341.       this.splitPane.registerKeyboardAction(new ToggleSideFocusHandler(this), KeyStroke.getKeyStroke(117, 0), 1);
  342.    }
  343.  
  344.    protected void installListeners() {
  345.       if ((this.propertyChangeListener = this.createPropertyChangeListener()) != null) {
  346.          this.splitPane.addPropertyChangeListener(this.propertyChangeListener);
  347.       }
  348.  
  349.       if ((this.focusListener = this.createFocusListener()) != null) {
  350.          this.splitPane.addFocusListener(this.focusListener);
  351.       }
  352.  
  353.       this.keyboardUpLeftListener = this.createKeyboardUpLeftListener();
  354.       this.keyboardDownRightListener = this.createKeyboardDownRightListener();
  355.       this.keyboardHomeListener = this.createKeyboardHomeListener();
  356.       this.keyboardEndListener = this.createKeyboardEndListener();
  357.       this.keyboardResizeToggleListener = this.createKeyboardResizeToggleListener();
  358.    }
  359.  
  360.    public void installUI(JComponent var1) {
  361.       this.splitPane = (JSplitPane)var1;
  362.       this.dividerLocationIsSet = false;
  363.       this.dividerKeyboardResize = false;
  364.       this.installDefaults();
  365.       this.installListeners();
  366.       this.installKeyboardActions();
  367.       this.setLastDragLocation(-1);
  368.    }
  369.  
  370.    public boolean isContinuousLayout() {
  371.       return this.continuousLayout;
  372.    }
  373.  
  374.    public void paint(Graphics var1, JComponent var2) {
  375.    }
  376.  
  377.    protected void resetLayoutManager() {
  378.       if (this.orientation == 1) {
  379.          this.layoutManager = new BasicHorizontalLayoutManager(this);
  380.       } else {
  381.          this.layoutManager = new BasicVerticalLayoutManager(this);
  382.       }
  383.  
  384.       this.splitPane.setLayout(this.layoutManager);
  385.       this.layoutManager.updateComponents();
  386.       this.splitPane.revalidate();
  387.       this.splitPane.repaint();
  388.    }
  389.  
  390.    public void resetToPreferredSizes(JSplitPane var1) {
  391.       if (this.splitPane != null) {
  392.          this.layoutManager.resetToPreferredSizes();
  393.          this.splitPane.revalidate();
  394.          this.layoutManager.layoutContainer(this.splitPane);
  395.       }
  396.  
  397.    }
  398.  
  399.    public void setContinuousLayout(boolean var1) {
  400.       this.continuousLayout = var1;
  401.    }
  402.  
  403.    public void setDividerLocation(JSplitPane var1, int var2) {
  404.       Component var3 = this.splitPane.getLeftComponent();
  405.       Component var4 = this.splitPane.getRightComponent();
  406.       if (var3 != null && var4 != null) {
  407.          Insets var5 = this.splitPane.getInsets();
  408.          if (var5 != null) {
  409.             if (this.orientation == 1) {
  410.                var3.setSize(Math.max(0, var2 - this.getDividerBorderSize() - var5.left), 10);
  411.             } else {
  412.                var3.setSize(10, Math.max(0, var2 - this.getDividerBorderSize() - var5.top));
  413.             }
  414.          } else if (this.orientation == 1) {
  415.             var3.setSize(Math.max(0, var2 - this.getDividerBorderSize()), 10);
  416.          } else {
  417.             var3.setSize(10, Math.max(0, var2 - this.getDividerBorderSize()));
  418.          }
  419.  
  420.          if (!this.dividerLocationIsSet) {
  421.             this.dividerLocationIsSet = true;
  422.          }
  423.  
  424.          this.splitPane.revalidate();
  425.          this.splitPane.repaint();
  426.       }
  427.  
  428.    }
  429.  
  430.    public void setLastDragLocation(int var1) {
  431.       this.lastDragLocation = var1;
  432.    }
  433.  
  434.    protected void setNonContinuousLayoutDivider(Component var1) {
  435.       this.setNonContinuousLayoutDivider(var1, true);
  436.    }
  437.  
  438.    protected void setNonContinuousLayoutDivider(Component var1, boolean var2) {
  439.       if (this.nonContinuousLayoutDivider != null && this.splitPane != null) {
  440.          this.splitPane.remove(this.nonContinuousLayoutDivider);
  441.       }
  442.  
  443.       this.nonContinuousLayoutDivider = var1;
  444.       if (this.nonContinuousLayoutDivider != null && this.splitPane != null) {
  445.          this.nonContinuousLayoutDivider.setLocation(-1000, -1000);
  446.          Component var3 = this.splitPane.getLeftComponent();
  447.          Component var4 = this.splitPane.getRightComponent();
  448.          int[] var5 = this.layoutManager.getSizes();
  449.          if (var3 != null) {
  450.             this.splitPane.setLeftComponent((Component)null);
  451.          }
  452.  
  453.          if (var4 != null) {
  454.             this.splitPane.setRightComponent((Component)null);
  455.          }
  456.  
  457.          this.splitPane.remove(this.divider);
  458.          this.splitPane.add(this.nonContinuousLayoutDivider, "nonContinuousDivider", this.splitPane.getComponentCount());
  459.          this.splitPane.setLeftComponent(var3);
  460.          this.splitPane.setRightComponent(var4);
  461.          this.splitPane.add(this.divider, "divider");
  462.          if (var2) {
  463.             this.layoutManager.setSizes(var5);
  464.          }
  465.  
  466.          this.splitPane.revalidate();
  467.          this.splitPane.paintImmediately(this.splitPane.getX(), this.splitPane.getY(), this.splitPane.getWidth(), this.splitPane.getHeight());
  468.       }
  469.  
  470.    }
  471.  
  472.    public void setOrientation(int var1) {
  473.       this.orientation = var1;
  474.    }
  475.  
  476.    protected void startDragging() {
  477.       Component var1 = this.splitPane.getLeftComponent();
  478.       Component var2 = this.splitPane.getRightComponent();
  479.       this.beginDragDividerLocation = this.getDividerLocation(this.splitPane);
  480.       this.draggingHW = false;
  481.       ComponentPeer var3;
  482.       if (var1 != null && (var3 = var1.getPeer()) != null && !(var3 instanceof LightweightPeer)) {
  483.          this.draggingHW = true;
  484.       } else if (var2 != null && (var3 = var2.getPeer()) != null && !(var3 instanceof LightweightPeer)) {
  485.          this.draggingHW = true;
  486.       }
  487.  
  488.       if (this.orientation == 1) {
  489.          this.setLastDragLocation(this.divider.getBounds().x);
  490.          this.dividerSize = this.divider.getSize().width + 2 * this.getDividerBorderSize();
  491.          if (!this.isContinuousLayout() && this.draggingHW) {
  492.             this.nonContinuousLayoutDivider.setBounds(this.getLastDragLocation(), 0, this.dividerSize, this.splitPane.getHeight());
  493.          }
  494.       } else {
  495.          this.setLastDragLocation(this.divider.getBounds().y);
  496.          this.dividerSize = this.divider.getSize().height + 2 * this.getDividerBorderSize();
  497.          if (!this.isContinuousLayout() && this.draggingHW) {
  498.             this.nonContinuousLayoutDivider.setBounds(0, this.getLastDragLocation(), this.splitPane.getWidth(), this.dividerSize);
  499.          }
  500.       }
  501.  
  502.    }
  503.  
  504.    protected void uninstallDefaults() {
  505.       if (this.splitPane.getLayout() == this.layoutManager) {
  506.          this.splitPane.setLayout((LayoutManager)null);
  507.       }
  508.  
  509.       if (this.nonContinuousLayoutDivider != null) {
  510.          this.splitPane.remove(this.nonContinuousLayoutDivider);
  511.       }
  512.  
  513.       LookAndFeel.uninstallBorder(this.splitPane);
  514.       this.splitPane.remove(this.divider);
  515.       this.divider.setBasicSplitPaneUI((BasicSplitPaneUI)null);
  516.       this.layoutManager = null;
  517.       this.divider = null;
  518.       this.nonContinuousLayoutDivider = null;
  519.       this.setNonContinuousLayoutDivider((Component)null);
  520.    }
  521.  
  522.    protected void uninstallKeyboardActions() {
  523.       this.splitPane.unregisterKeyboardAction(this.upKey);
  524.       this.splitPane.unregisterKeyboardAction(this.downKey);
  525.       this.splitPane.unregisterKeyboardAction(this.leftKey);
  526.       this.splitPane.unregisterKeyboardAction(this.rightKey);
  527.       this.splitPane.unregisterKeyboardAction(this.homeKey);
  528.       this.splitPane.unregisterKeyboardAction(this.endKey);
  529.       this.splitPane.unregisterKeyboardAction(this.dividerResizeToggleKey);
  530.       this.splitPane.unregisterKeyboardAction(KeyStroke.getKeyStroke(117, 0));
  531.       this.splitPane.unregisterKeyboardAction(this.kpUpKey);
  532.       this.splitPane.unregisterKeyboardAction(this.kpDownKey);
  533.       this.splitPane.unregisterKeyboardAction(this.kpLeftKey);
  534.       this.splitPane.unregisterKeyboardAction(this.kpRightKey);
  535.       this.kpUpKey = this.kpDownKey = this.kpLeftKey = this.kpRightKey = null;
  536.       this.upKey = null;
  537.       this.downKey = null;
  538.       this.leftKey = null;
  539.       this.rightKey = null;
  540.       this.homeKey = null;
  541.       this.endKey = null;
  542.       this.dividerResizeToggleKey = null;
  543.    }
  544.  
  545.    protected void uninstallListeners() {
  546.       if (this.propertyChangeListener != null) {
  547.          this.splitPane.removePropertyChangeListener(this.propertyChangeListener);
  548.          this.propertyChangeListener = null;
  549.       }
  550.  
  551.       if (this.focusListener != null) {
  552.          this.splitPane.removeFocusListener(this.focusListener);
  553.          this.focusListener = null;
  554.       }
  555.  
  556.       this.keyboardUpLeftListener = null;
  557.       this.keyboardDownRightListener = null;
  558.       this.keyboardHomeListener = null;
  559.       this.keyboardEndListener = null;
  560.       this.keyboardResizeToggleListener = null;
  561.    }
  562.  
  563.    public void uninstallUI(JComponent var1) {
  564.       this.uninstallKeyboardActions();
  565.       this.uninstallListeners();
  566.       this.uninstallDefaults();
  567.       this.dividerLocationIsSet = false;
  568.       this.dividerKeyboardResize = false;
  569.       this.splitPane = null;
  570.    }
  571. }
  572.